package com.chj.design.sk;

public class Code15_Singleton {
	public static class DCLSingleton {
		private static volatile DCLSingleton dclSingleton;

		private DCLSingleton() {
		}

		public static DCLSingleton getInstance() {
			DCLSingleton current = dclSingleton;
			if (dclSingleton == null) {
				synchronized (DCLSingleton.class) {
					current = dclSingleton;
					if (dclSingleton == null) {
						current = dclSingleton = new DCLSingleton();
					}
				}
			}
			return current;
		}
	}
}
